<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <link rel="stylesheet" href="http://www.petercorke.com/RVC/common/toolboxhelp.css">
    <title>M-File Help: multidfprintf</title>
  </head>
  <body>
  <table border="0" cellspacing="0" width="100%">
    <tr class="subheader">
      <td class="headertitle">M-File Help: multidfprintf</td>
      <td class="subheader-left"><a href="matlab:open multidfprintf">View code for multidfprintf</a></td>
    </tr>
  </table>
<h1>multidfprintf</h1><p><span class="helptopic">Print formatted text to multiple streams</span></p><p>
COUNT = MULTIDFPRINTF(IDVEC, FORMAT, A, ...) performs formatted output
to multiple streams such as console and files.  FORMAT is the format string
as used by sprintf and fprintf.  A is the array of elements, to which the
format will be applied similar to sprintf and fprint.

</p>
<p>
IDVEC is a vector (1xN) of file descriptors and COUNT is a vector (1xN) of
the number of bytes written to each file.

</p>
<h2>Notes</h2>
<ul>
  <li>To write to the consolde use the file identifier 1.</li>
</ul>
<h2>Example</h2>
<pre style="width: 90%%;" class="examples">
%&nbsp;Create&nbsp;and&nbsp;open&nbsp;a&nbsp;new&nbsp;example&nbsp;file:
fid&nbsp;=&nbsp;fopen('exampleFile.txt','w+');
%&nbsp;Write&nbsp;something&nbsp;to&nbsp;the&nbsp;file&nbsp;and&nbsp;the&nbsp;console&nbsp;simultaneously:
multidfprintf([1&nbsp;FID],'%&nbsp;s&nbsp;%&nbsp;d&nbsp;%&nbsp;d&nbsp;%&nbsp;d!\n','This&nbsp;is&nbsp;a&nbsp;test!',1,2,3);
%&nbsp;Close&nbsp;the&nbsp;file:
fclose(FID);
</pre>
<h2>Authors</h2>
<p>
Joern Malzahn, (joern.malzahn@tu-dortmund.de)

</p>
<h2>See also</h2>
<p>
<a href="fprintf.html">fprintf</a>, <a href="sprintf.html">sprintf</a></p>
<hr>

<table border="0" width="100%" cellpadding="0" cellspacing="0">
  <tr class="subheader" valign="top"><td>&nbsp;</td></tr></table>
<p class="copy">&copy; 1990-2014 Peter Corke.</p>
</body></html>